package event

import android.util.Log
import ext.log

class AckEvent(val status: Int) {
    companion object {
        const val OK = 0x00
        const val HEADER = 0x01
        const val END = 0x02
        const val CHECK = 0x03
        const val LENGTH = 0x04
        const val LENGTH2 = 0x05
        const val BUSY = 0x06
    }

    init {
        log("ACK:$status")
        if (status != OK) {
            Log.e("错误", "通信异常:$status")
        }
    }

    override fun toString(): String {
        return "status:$status"
    }
}